<template>
  <div style="background: #f7f8fa; min-height: 100vh">
    <z-paging ref="paging" v-model="list" class="notice-list" @query="getlist">
      <div style="background-color: #f7f8fa; padding: 10rpx" class="pt10r">
        <u-search placeholder="请输入标题" v-model="keyword"></u-search>
        <div class="bgf" id="tabs">
          <u-tabs :list="tabs" @click="change"></u-tabs>
        </div>
        <!-- 推荐 -->
        <ftag v-if="tabsIndex>1" :list="radios" @change="recommendTag" :key="1"/>
        <ftag :list="radios1" @change="recommendTag" key="2"/>
      </div>
      <div style="padding: 0 20rpx">
        <div
            class="bgf w100 mb20r mt10r"
            style="padding: 15rpx"
            v-for="(item, index) in 6"
            :key="index"
        >
          <div class="fs34r b">??????专项培训111</div>
          <div class="mt20r f ac">
            <div>评测结果 ：</div>
            <div>评测结果</div>
          </div>
          <div class="mt20r f ac">
            <div>发布时间 ：</div>
            <div>发布时间</div>
          </div>
          <div class="mt20r f ac">
            <div>评测期限 ：</div>
            <div>评测期限</div>
          </div>
          <div class="mt20r f ac">
            <div>评测时长 ：</div>
            <div>评测时长</div>
          </div>
          <div class="f ac xb">
            <div
                style="
                padding: 5rpx;
                background-color: #d3e3fd;
                width: fit-content;
                color: #7f7f7f;
              "
                class="rds15r fs20r mt10r"
            >
              允许补考
            </div>
            <div style="width: 20vw" @click="go">
              <u-button customStyle="margin-top: 20rpx;width: fit-content" type="primary" text="参与测评"
                        size="mini"></u-button>
            </div>
          </div>
        </div>
      </div>
    </z-paging>
  </div>
</template>

<script>
import Ftag from "../../components/Ftag.vue";
// import ZPaging from "../../uni_modules/z-paging/components/z-paging/z-paging.vue";

export default {
  name: 'allEvaluations',
  components: { Ftag},
  data() {
    return {
      radios: [
        {id: 1, name: "标签1"},
        {id: 2, name: "标签2"},
        {id: 3, name: "标签311111"},
        {id: 4, name: "标签41111111111"},
        {id: 5, name: "标签5"},
        {id: 6, name: "标签6"},
        {id: 7, name: "标签7"},
        {id: 8, name: "标签8"},
      ],
      radios1: [
        {id: 1, name: "标签112"},
        {id: 2, name: "标签2334"},
        {id: 3, name: "标签311111"},
        {id: 4, name: "标签41111111111"},
        {id: 5, name: "标签5"},
        {id: 6, name: "标签6"},
        {id: 7, name: "标签7"},
        {id: 8, name: "标签8"},
      ],
      tabsIndex: 0,
      tabs: [{name: '益马驾校'}, {name: '基础培训'}, {name: '专项培训'}, {name: '质量培训'}],
      keyword: "",
      list: [{}, {}, {}],
    };
  },
  // 下拉刷新
  onPullDownRefresh() {
    console.log("下拉刷新");
    setTimeout(function () {
      uni.stopPullDownRefresh();
    }, 1000);
  },
  onLoad(){
    wx.showShareMenu({
				withShareTicket: true,
				menus: ["shareAppMessage", "shareTimeline"]
			})
  },
  methods: {
    getlist() {
      // this.$refs.paging.complete([{}, {}, {}])
    },
    change(e) {
      this.tabsIndex = e.index;
      console.log(e);
      this.$refs.paging.reload();
    },
    recommendTag(id) {
      console.log(id);
      this.$refs.paging.reload();
    },
    go() {
      uni.navigateTo({
        url: "/pages/authentication/assessment",
      });
    },
  },
};
</script>

<style scoped lang="scss"></style>
